home *** CD-ROM | disk | FTP | other *** search
- Path: nut.trin.cam.ac.uk!jad1002
- From: jad1002@cam.ac.uk (James Dennett)
- Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2
- Subject: Re: Hungarian notation
- Date: Wed, 31 Jan 1996 02:01:16
- Organization: University of Cambridge, England
- Message-ID: <jad1002.29.00020579@cam.ac.uk>
- References: <30C40F77.53B5@swsbbs.com> <4bd <4cc2b2$11jq@navajo.gate.net> <4cud8f$gup@news.netvision.net.il> <4dttefINNo29@keats.ugrad.cs.ubc.ca> <Pine.HPP.3.91.960122145028.27524A-100000@clear.cs.byu.edu> <dewar.822407363@schonberg> <Pine.HPP.3.91.960124References: <30C40F77.53B5@swsbbs.com> <4bd <4cc2b2$11jq@navajo.gate.net> <4cud8f$gup@news.netvision.net.il> <4dttefINNo29@keats.ugrad.cs.ubc.ca> <Pine.HPP.3.91.960122145028.27524A-100000@clear.cs.byu.edu> <dewar.822407363@schonberg> <Pine.HPP.3.91.960124Organization: Trinity College, Cambridge
- NNTP-Posting-Host: nut.trin.cam.ac.uk
- X-Newsreader: Trumpet for Windows [Version 1.0 Rev A]
-
- In article <Pine.HPP.3.91.960129133429.8419C-100000@foggy.cs.byu.edu> Douglas Evan Cook <cookd@cs.byu.edu> writes:
- >From: Douglas Evan Cook <cookd@cs.byu.edu>
- >Subject: Re: Hungarian notation
- >Date: Mon, 29 Jan 1996 13:42:18 -0700
-
- >On 25 Jan 1996, Richard A. O'Keefe wrote:
-
- >> Suppose there is some package that defines a type Pack.T
- >> where I don't have access to the representation, only the operations.
- >> As long as there is a Pack.T'Write and a Pack.T'Read (forgive me if
- >> I've got the syntax a bit wrong, I'm still learning about Ada 95
- >> streams) *I* don't have to know what the size of an instance of the
- >> type is in the file. The size appears explicitly nowhere in my code.
-
- >No, but somebody must have written those methods, no? And that somebody
- >needed to know how many bits each data type is, no? When we changed from
- >16 bit compiler to 32 bit compiler, the data files remained the same.
-
- Herein lies your problem - you broke the ADT. If the ADT didn't specify the
- size of the components then your code can't rely on them...
- so the data files would not necessarily remain the same if
- the implementation of the ADT changed.
-
- A clean way to deal with this would be to convert the data files. Done
- properly, this wouldn't inconvenience users.
-
- Now, if you wanted to keep the same data files then your type specification
- should have mentioned the implementation details is a little more detail.
- Slightly ugly from an abstract point of view, but RL is like that.
-
- Flame if you will.
-
- James Dennett
-
- >Any code that directly accesses the data structures (which is rare
- >outside of library design) needs to know the data structure. Also, when
- >you are making system calls (in assembler, or when you are interfacing
- >with Windows and need to do an API call) you also need to do bit level
- >interaction with the data structures.
-
-
-